import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import market from '@/components/market'
import trade from '@/components/trade'
//import menu from '@/components/common/menu'
//
import TradeHistory from "@/components/trade/history";
import MARKET from '@/components/trade/market'
import TRADE from '@/components/trade/trade'
import ORDER from '@/components/trade/order'
import LOGIN from '@/components/login'



import Balances from "@/components/balances/Balances";
import BalancesDetail from "@/components/BalancesDetail/BalancesDetail";
import Deposit from "@/components/deposit/Deposit";
import Withdrawal from "@/components/withdrawal/Withdrawal";
import History from "@/components/history/History";
import '@/components/common/menu.js'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/hello',
            name: 'HelloWorld',
            component: HelloWorld
        },
        {
            path: '/',
            name: 'login',
            component: LOGIN
        },
        {
            path: '/login',
            name: 'login',
            component: LOGIN
        },
        {
            path: '/market',
            name: 'market',
            component: market
        },
        {
            name: "balances",
            path: "/balances",
            component: Balances
          },
          {
            name: "balances_detail",
            path: "/balances_detail/:coin_type",
            component: BalancesDetail
          },
          {
            name: "deposit",
            path: "/deposit/:coin_type",
            component: Deposit
          },
          {
            name: "withdrawal",
            path: "/withdrawal/:coin_type",
            component: Withdrawal
          },
          {
              name: 'history',
              path: '/history/:coin_type',
              component: History
          },
        {
            path: '/trade',
            name: 'trade',
            component: trade,

            children : [ {
                    path: '/trade/market:coin_type/:use_coin_type',
                    name: 'trade_market',
                    component: MARKET
                },
                {
                    path: '/trade/trade/:coin_type/:use_coin_type',
                    name: 'trade_trade',
                    //meta:{auth:true},
                    component: TRADE
                },
                {
                    path: '/trade/order/:coin_type/:use_coin_type',
                    name: 'trade_order',
                    meta:{auth:true},
                    component: ORDER
                },
                {
                    path: '/trade/history:coin_type/:use_coin_type',
                    name: 'trade_history',
                    meta:{auth:true},
                    component: TradeHistory
                },
            ]}
        ]
        })
